/**
 * Copyright 2020 Vercel Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 12px;
  gap: 12px;
}

@media (min-width: 1200px) {
  .form.share-page {
    justify-content: flex-start;
  }
}

.input {
  border: none;
  width: 100%;
  background: transparent;
  outline: none;
  height: 56px;
  padding-left: 15px;
  padding-right: 15px;
  font-size: var(--text-md);
  color: #fff;
  font-family: inherit;
}

@media (min-width: 768px) {
  .input {
    width: calc(100% - var(--space-32x));
    padding-right: 0;
  }
}

.input::placeholder {
  color: var(--secondary-color);
}

.input-label {
  background-color: var(--gray);
  border-radius: var(--space-2x);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  display: block;
}

.input-label.focused {
  background-color: #33373c;
}

.input-label.error {
  background: red;
}

.input-label.success {
  background: #0070f3;
}

.input-text {
  display: flex;
  align-items: center;
  width: 100%;
}

.form-row {
  position: relative;
  max-width: 400px;
  width: 100%;
}

@media (min-width: 768px) {
  .form-row {
    max-width: 480px;
  }
}

.submit {
  width: 100%;
  height: 56px;
  margin-top: var(--space-4x);
  border-radius: var(--space-2x);
  border: 1px solid var(--brand);
  background: var(--brand);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  outline: none;
  font-weight: 500;
  color: white;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit.generate-with-github {
  display: flex;
  margin-bottom: 12px;
  position: relative;
}

@media (min-width: 768px) {
  .submit.register {
    width: 120px;
    height: 40px;
    margin-top: 0;
    position: absolute;
    border-radius: 5px;
    right: var(--space-2x);
    top: var(--space-2x);
  }
}

.submit.loading {
  cursor: default;
}

.submit.default:hover,
.submit.default:focus {
  background: black;
  color: var(--brand);
}

.submit.default.generate-with-github:hover path,
.submit.default.generate-with-github:focus path {
  fill: var(--brand);
}

.submit.error:hover,
.submit.error:focus {
  background: #000;
  color: #fff;
}

.submit.default:disabled,
.submit.default:disabled:hover,
.submit.default:disabled:focus {
  cursor: default;
  background: var(--gray);
  border-color: var(--gray);
  color: #fff;
  justify-content: flex-start;
  overflow: hidden;
}

.submit.default.generate-with-github:disabled path,
.submit.default.generate-with-github:disabled:hover path,
.submit.default.generate-with-github:disabled:focus path {
  fill: #fff;
}

.submit.default.generate-with-github.not-allowed:disabled {
  cursor: not-allowed;
}

@media (min-width: 1200px) {
  .form-row {
    margin: 0;
  }

  .submit.generate-with-github {
    width: 240px;
  }
}

.stage-btn {
  background: #323332;
  border: 2px solid #8465cb;
}

.github-wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.or-divider {
  width: 100%;
  text-align: center;
  color: var(--secondary-color);
  margin: var(--space-4x) 0;
}

@media (min-width: 1200px) {
  .github-wrapper {
    flex-direction: row;
  }
  .or-divider {
    width: 240px;
    margin: 0;
  }
}
